/**
 * User: alesj
 * Date: 15.1.2006
 * Time: 15:28:01
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.alesj.blueberry.ejb.common;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Simple parent class for transient logging capabilites.
 * Useful when needing serializable ejb bean.
 *
 * @author <a href="mailto:ales.justin@genera-lynx.com">Ales Justin</a>
 */
public class AbstractLogManager {

    private transient Log log;

    /**
     * Creates log if it doesn't exist yet.
     *
     * @return log object
     */
    public Log getLog() {
        if (log == null) {
            log = LogFactory.getLog(getClass());
        }
        return log;
    }

}
